package cc.lucien.templatemethod;

/**
 * @author lucien-ma
 * @date 2021/11/7
 * @apiNote
 */
public abstract class Cook {
    public void open(){
        System.out.println("打开抽烟机 ");
    }

    public void fire() {
        System.out.println("生活");
    }

    public abstract void doCook();

    public void outFire() {
        System.out.println("关火");
    }

    public void close() {
        System.out.println("关闭抽油烟机");
    }

    public void cook() {
        this.open();
        this.fire();
        this.doCook();
        this.outFire();
        this.close();
    }
}
